﻿using System.Data.Entity.ModelConfiguration;
using QDT.Core.Deals;

namespace QDT.Core.MSData.Mapping
{
    public class RepayRecordMapping : EntityTypeConfiguration<RepayRecord>
    {
        public RepayRecordMapping()
        {
            HasKey(x => x.ID);
            Property(x => x.ProjectId).HasColumnName("deal_id");
            Property(x => x.UserId).HasColumnName("user_id");
            Property(x => x.SelfMoney).HasColumnName("self_money");
            Property(x => x.RepayMoney).HasColumnName("repay_money");
            Property(x => x.ManageMoney).HasColumnName("manage_money");
            Property(x => x.ImposeMoney).HasColumnName("impose_money");
            Property(x => x.RepayTime).HasColumnName("repay_time");
            Property(x => x.TrueRepayTime).HasColumnName("true_repay_time");
            Property(x => x.InnerStatus).HasColumnName("status");
            Property(x => x.Stage).HasColumnName("u_key");

            ToTable(DB.TPref("deal_load_repay"));
        }
    }
}
